package com.itheima.chapter03.config;

import com.itheima.chapter03.web.FirstServlet;
import com.itheima.chapter03.web.MyFilter;
import com.itheima.chapter03.web.MyListener;
import com.itheima.chapter03.web.SecondServlet;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class WebConfigure {
    @Bean("firstServlet")
    public FirstServlet firstServlet() {
        return new FirstServlet();
    }

    @Bean("secondServlet")
    public SecondServlet secondServlet() {
        return new SecondServlet();
    }

    @Bean
    public MyFilter myFilter() {
        return new MyFilter();
    }

    @Bean
    public MyListener myListener() {
        return new MyListener();
    }
}
